package appAdater
{
	import flash.display.DisplayObject;
	import flash.display.Graphics;
	import flash.display.LoaderInfo;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;
	
	public class AppAdater extends Sprite implements IAppAdater
	{
		private var content:DisplayObject;
		public function AppAdater(content:DisplayObject)
		{
			super();
			this.content=content;
		}
		
		public function pause():void
		{
			if(content is MovieClip){
				var mc:MovieClip=content as MovieClip;
				if(mc.totalFrames>0){
					mc.stop();
				}
			}
		}
		
		public function start():void
		{
			if(content is MovieClip){
				var mc:MovieClip=content as MovieClip;
				if(mc.totalFrames>0){
					mc.play();
				}
			}
			this.addChild(content);
			//this.stage.addEventListener(Event.RESIZE,resizeHandle);
		}
		
		private function resizeHandle(event:Event):void{
			
		}
		
		public function unload():void
		{
			if(content.parent){
				this.removeChild(content);
			}
			//this.stage.removeEventListener(Event.RESIZE,resizeHandle);
		}
	}
}